# -*- coding: utf-8 -*-

# Scrapy settings for evny project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
#     https://doc.scrapy.org/en/latest/topics/settings.html
#     https://doc.scrapy.org/en/latest/topics/downloader-middleware.html
#     https://doc.scrapy.org/en/latest/topics/spider-middleware.html



ES_URL = ['127.0.0.1:9200']
INDEX_MAIN = 'post'
INDEX_SLAVE = 'post2'
DOC_TYPE = 'text'

BOT_NAME = 'evny'

SPIDER_MODULES = ['evny.spiders']
NEWSPIDER_MODULE = 'evny.spiders'

# LOG_LEVEL='INFO'

# Crawl responsibly by identifying yourself (and your website) on the user-agent
USER_AGENT = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.80 Safari/537.36'

# Obey robots.txt rules
ROBOTSTXT_OBEY = False

# Configure maximum concurrent requests performed by Scrapy (default: 16)
CONCURRENT_REQUESTS = 16

# Configure a delay for requests for the same website (default: 0)
# See https://doc.scrapy.org/en/latest/topics/settings.html#download-delay
# See also autothrottle settings and docs
DOWNLOAD_DELAY = 1
# The download delay setting will honor only one of:
#CONCURRENT_REQUESTS_PER_DOMAIN = 16
#CONCURRENT_REQUESTS_PER_IP = 16

# Disable cookies (enabled by default)
COOKIES_ENABLED = False
# COOKIES = {
# "langconvwwweynycom":"1",
# "598e55XbD_e8d7_auth":"c84asqJibNoA1AMUsoU1Epr0%2F%2FbEC%2F7NmOU55kYlJlIjh5Lttc57KMHqdxCZaaU",
# "598e55XbD_e8d7_lastvisit":"1550571369",
# "598e55XbD_e8d7_sid":"a6r5YM",
# "598e55XbD_e8d7_inlang":"zh",
# "598e55XbD_e8d7_txlang":"0",
# "username":"hello9009",
# "598e55XbD_e8d7_home_readfeed":"1550574969",
# "598e55XbD_e8d7_ulastactivity":"07d1vplTC4SYLCm0DrE6hkTcljn0DI0nkgvXuFZiTTqLLwGH16GE",
# "598e55XbD_e8d7_sendmail":"1",
# "598e55XbD_e8d7_onlineusernum":"9841",
# "598e55XbD_e8d7_favorite":"a%3A1%3A%7Bi%3A1724%3Bs%3A12%3A%22%E6%99%82%E4%BA%8B%E8%A8%8E%E8%AB%96%22%3B%7D",
# "598e55XbD_e8d7_visitedfid":"1724",
# "598e55XbD_e8d7_lastact":"1550574982%09forum.php%09forumdisplay",
# "598e55XbD_e8d7_forum_lastvisit":"D_1724_1550574982",
# }
COOKIES = {
"langconvwwweynycom":"1",
"username":"hello90",
"598e55XbD_e8d7_auth":"1e904Y4%2BR8Cf5zUZlAvsFq%2Bqw%2Bk%2BzTR7t2bgLJKSF1WTDK9dsw7l5X3vbwo58qI",
"598e55XbD_e8d7_lastvisit":"1550620837",
"598e55XbD_e8d7_sid":"7tps96",
"598e55XbD_e8d7_inlang":"zh",
"598e55XbD_e8d7_txlang":"0",
"598e55XbD_e8d7_onlineusernum":"5208",
"598e55XbD_e8d7_ulastactivity":"a31cpIOqSXiYJ9HXUKr7l%2Bknp5cYM2kCKMtRik5ItJD7ei1AfNXN",
"598e55XbD_e8d7_sendmail":"1",
"598e55XbD_e8d7_favorite":"a%3A1%3A%7Bi%3A1724%3Bs%3A12%3A%22%E6%99%82%E4%BA%8B%E8%A8%8E%E8%AB%96%22%3B%7D",
"598e55XbD_e8d7_visitedfid":"1724",
"598e55XbD_e8d7_smile":"1D1",
"598e55XbD_e8d7_secqaaS7tps960":"14ffGqO8XcuN%2BHN1cRwgTYdKt8rpwmYVNofHGRothYtXRIsF17VgiKue7ABEqP%2BFct%2FvuHrmLc3YDXkaD5ys0OrdaWM4pAdakvmiarw3maocykhcPIi9MDp2",
"598e55XbD_e8d7_lastact":"1550624478%09forum.php%09forumdisplay",
"598e55XbD_e8d7_forum_lastvisit":"D_1724_1550624478",
}
# Disable Telnet Console (enabled by default)
#TELNETCONSOLE_ENABLED = False

# Override the default request headers:
#DEFAULT_REQUEST_HEADERS = {
#   'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
#   'Accept-Language': 'en',
#}

# Enable or disable spider middlewares
# See https://doc.scrapy.org/en/latest/topics/spider-middleware.html
#SPIDER_MIDDLEWARES = {
#    'evny.middlewares.EvnySpiderMiddleware': 543,
#}

# Enable or disable downloader middlewares
# See https://doc.scrapy.org/en/latest/topics/downloader-middleware.html
#DOWNLOADER_MIDDLEWARES = {
#    'evny.middlewares.EvnyDownloaderMiddleware': 543,
#}

# Enable or disable extensions
# See https://doc.scrapy.org/en/latest/topics/extensions.html
#EXTENSIONS = {
#    'scrapy.extensions.telnet.TelnetConsole': None,
#}

# Configure item pipelines
# See https://doc.scrapy.org/en/latest/topics/item-pipeline.html
#ITEM_PIPELINES = {
#    'evny.pipelines.EvnyPipeline': 300,
#}

# Enable and configure the AutoThrottle extension (disabled by default)
# See https://doc.scrapy.org/en/latest/topics/autothrottle.html
#AUTOTHROTTLE_ENABLED = True
# The initial download delay
#AUTOTHROTTLE_START_DELAY = 5
# The maximum download delay to be set in case of high latencies
#AUTOTHROTTLE_MAX_DELAY = 60
# The average number of requests Scrapy should be sending in parallel to
# each remote server
#AUTOTHROTTLE_TARGET_CONCURRENCY = 1.0
# Enable showing throttling stats for every response received:
#AUTOTHROTTLE_DEBUG = False

# Enable and configure HTTP caching (disabled by default)
# See https://doc.scrapy.org/en/latest/topics/downloader-middleware.html#httpcache-middleware-settings
#HTTPCACHE_ENABLED = True
#HTTPCACHE_EXPIRATION_SECS = 0
#HTTPCACHE_DIR = 'httpcache'
#HTTPCACHE_IGNORE_HTTP_CODES = []
#HTTPCACHE_STORAGE = 'scrapy.extensions.httpcache.FilesystemCacheStorage'
